added samples
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2008 / CSLinqToEntities / School.Designer.cs
blob8a976cf3ac2e7d4e3f39bd5b62c0dcea1e7f7863
1 //------------------------------------------------------------------------------
2 // <auto-generated>
3 // This code was generated by a tool.
4 // Runtime Version:2.0.50727.3053
5 //
6 // Changes to this file may cause incorrect behavior and will be lost if
7 // the code is regenerated.
8 // </auto-generated>
9 //------------------------------------------------------------------------------
11 [assembly: global::System.Data.Objects.DataClasses.EdmSchemaAttribute()]
12 [assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("SchoolModel", "FK_CourseGrade_Course", "Course", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(CSLinqToEntities.Course), "CourseGrade", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(CSLinqToEntities.CourseGrade))]
13 [assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("SchoolModel", "FK_CourseGrade_Student", "Person", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(CSLinqToEntities.Person), "CourseGrade", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(CSLinqToEntities.CourseGrade))]
14 [assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("SchoolModel", "CourseInstructor", "Course", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(CSLinqToEntities.Course), "Person", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(CSLinqToEntities.Person))]
16 // Original file name:
17 // Generation date: 09/04/08 1:53:01 PM
18 namespace CSLinqToEntities
21 /// <summary>
22 /// There are no comments for SchoolEntities in the schema.
23 /// </summary>
24 public partial class SchoolEntities : global::System.Data.Objects.ObjectContext
26 /// <summary>
27 /// Initializes a new SchoolEntities object using the connection string found in the 'SchoolEntities' section of the application configuration file.
28 /// </summary>
29 public SchoolEntities() :
30 base("name=SchoolEntities", "SchoolEntities")
32 this.OnContextCreated();
34 /// <summary>
35 /// Initialize a new SchoolEntities object.
36 /// </summary>
37 public SchoolEntities(string connectionString) :
38 base(connectionString, "SchoolEntities")
40 this.OnContextCreated();
42 /// <summary>
43 /// Initialize a new SchoolEntities object.
44 /// </summary>
45 public SchoolEntities(global::System.Data.EntityClient.EntityConnection connection) :
46 base(connection, "SchoolEntities")
48 this.OnContextCreated();
50 partial void OnContextCreated();
51 /// <summary>
52 /// There are no comments for Course in the schema.
53 /// </summary>
54 public global::System.Data.Objects.ObjectQuery<Course> Course
56 get
58 if ((this._Course == null))
60 this._Course = base.CreateQuery<Course>("[Course]");
62 return this._Course;
65 private global::System.Data.Objects.ObjectQuery<Course> _Course;
66 /// <summary>
67 /// There are no comments for CourseGrade in the schema.
68 /// </summary>
69 public global::System.Data.Objects.ObjectQuery<CourseGrade> CourseGrade
71 get
73 if ((this._CourseGrade == null))
75 this._CourseGrade = base.CreateQuery<CourseGrade>("[CourseGrade]");
77 return this._CourseGrade;
80 private global::System.Data.Objects.ObjectQuery<CourseGrade> _CourseGrade;
81 /// <summary>
82 /// There are no comments for Person in the schema.
83 /// </summary>
84 public global::System.Data.Objects.ObjectQuery<Person> Person
86 get
88 if ((this._Person == null))
90 this._Person = base.CreateQuery<Person>("[Person]");
92 return this._Person;
95 private global::System.Data.Objects.ObjectQuery<Person> _Person;
96 /// <summary>
97 /// There are no comments for Course in the schema.
98 /// </summary>
99 public void AddToCourse(Course course)
101 base.AddObject("Course", course);
103 /// <summary>
104 /// There are no comments for CourseGrade in the schema.
105 /// </summary>
106 public void AddToCourseGrade(CourseGrade courseGrade)
108 base.AddObject("CourseGrade", courseGrade);
110 /// <summary>
111 /// There are no comments for Person in the schema.
112 /// </summary>
113 public void AddToPerson(Person person)
115 base.AddObject("Person", person);
118 /// <summary>
119 /// There are no comments for SchoolModel.Course in the schema.
120 /// </summary>
121 /// <KeyProperties>
122 /// CourseID
123 /// </KeyProperties>
124 [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="SchoolModel", Name="Course")]
125 [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
126 [global::System.Serializable()]
127 public partial class Course : global::System.Data.Objects.DataClasses.EntityObject
129 /// <summary>
130 /// Create a new Course object.
131 /// </summary>
132 /// <param name="courseID">Initial value of CourseID.</param>
133 /// <param name="title">Initial value of Title.</param>
134 /// <param name="credits">Initial value of Credits.</param>
135 /// <param name="departmentID">Initial value of DepartmentID.</param>
136 public static Course CreateCourse(int courseID, string title, int credits, int departmentID)
138 Course course = new Course();
139 course.CourseID = courseID;
140 course.Title = title;
141 course.Credits = credits;
142 course.DepartmentID = departmentID;
143 return course;
145 /// <summary>
146 /// There are no comments for Property CourseID in the schema.
147 /// </summary>
148 [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
149 [global::System.Runtime.Serialization.DataMemberAttribute()]
150 public int CourseID
154 return this._CourseID;
158 this.OnCourseIDChanging(value);
159 this.ReportPropertyChanging("CourseID");
160 this._CourseID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
161 this.ReportPropertyChanged("CourseID");
162 this.OnCourseIDChanged();
165 private int _CourseID;
166 partial void OnCourseIDChanging(int value);
167 partial void OnCourseIDChanged();
168 /// <summary>
169 /// There are no comments for Property Title in the schema.
170 /// </summary>
171 [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
172 [global::System.Runtime.Serialization.DataMemberAttribute()]
173 public string Title
177 return this._Title;
181 this.OnTitleChanging(value);
182 this.ReportPropertyChanging("Title");
183 this._Title = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
184 this.ReportPropertyChanged("Title");
185 this.OnTitleChanged();
188 private string _Title;
189 partial void OnTitleChanging(string value);
190 partial void OnTitleChanged();
191 /// <summary>
192 /// There are no comments for Property Credits in the schema.
193 /// </summary>
194 [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
195 [global::System.Runtime.Serialization.DataMemberAttribute()]
196 public int Credits
200 return this._Credits;
204 this.OnCreditsChanging(value);
205 this.ReportPropertyChanging("Credits");
206 this._Credits = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
207 this.ReportPropertyChanged("Credits");
208 this.OnCreditsChanged();
211 private int _Credits;
212 partial void OnCreditsChanging(int value);
213 partial void OnCreditsChanged();
214 /// <summary>
215 /// There are no comments for Property DepartmentID in the schema.
216 /// </summary>
217 [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
218 [global::System.Runtime.Serialization.DataMemberAttribute()]
219 public int DepartmentID
223 return this._DepartmentID;
227 this.OnDepartmentIDChanging(value);
228 this.ReportPropertyChanging("DepartmentID");
229 this._DepartmentID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
230 this.ReportPropertyChanged("DepartmentID");
231 this.OnDepartmentIDChanged();
234 private int _DepartmentID;
235 partial void OnDepartmentIDChanging(int value);
236 partial void OnDepartmentIDChanged();
237 /// <summary>
238 /// There are no comments for CourseGrade in the schema.
239 /// </summary>
240 [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("SchoolModel", "FK_CourseGrade_Course", "CourseGrade")]
241 [global::System.Xml.Serialization.XmlIgnoreAttribute()]
242 [global::System.Xml.Serialization.SoapIgnoreAttribute()]
243 [global::System.Runtime.Serialization.DataMemberAttribute()]
244 public global::System.Data.Objects.DataClasses.EntityCollection<CourseGrade> CourseGrade
248 return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection<CourseGrade>("SchoolModel.FK_CourseGrade_Course", "CourseGrade");
252 if ((value != null))
254 ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection<CourseGrade>("SchoolModel.FK_CourseGrade_Course", "CourseGrade", value);
258 /// <summary>
259 /// There are no comments for Person in the schema.
260 /// </summary>
261 [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("SchoolModel", "CourseInstructor", "Person")]
262 [global::System.Xml.Serialization.XmlIgnoreAttribute()]
263 [global::System.Xml.Serialization.SoapIgnoreAttribute()]
264 [global::System.Runtime.Serialization.DataMemberAttribute()]
265 public global::System.Data.Objects.DataClasses.EntityCollection<Person> Person
269 return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection<Person>("SchoolModel.CourseInstructor", "Person");
273 if ((value != null))
275 ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection<Person>("SchoolModel.CourseInstructor", "Person", value);
280 /// <summary>
281 /// There are no comments for SchoolModel.CourseGrade in the schema.
282 /// </summary>
283 /// <KeyProperties>
284 /// EnrollmentID
285 /// </KeyProperties>
286 [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="SchoolModel", Name="CourseGrade")]
287 [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
288 [global::System.Serializable()]
289 public partial class CourseGrade : global::System.Data.Objects.DataClasses.EntityObject
291 /// <summary>
292 /// Create a new CourseGrade object.
293 /// </summary>
294 /// <param name="enrollmentID">Initial value of EnrollmentID.</param>
295 public static CourseGrade CreateCourseGrade(int enrollmentID)
297 CourseGrade courseGrade = new CourseGrade();
298 courseGrade.EnrollmentID = enrollmentID;
299 return courseGrade;
301 /// <summary>
302 /// There are no comments for Property EnrollmentID in the schema.
303 /// </summary>
304 [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
305 [global::System.Runtime.Serialization.DataMemberAttribute()]
306 public int EnrollmentID
310 return this._EnrollmentID;
314 this.OnEnrollmentIDChanging(value);
315 this.ReportPropertyChanging("EnrollmentID");
316 this._EnrollmentID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
317 this.ReportPropertyChanged("EnrollmentID");
318 this.OnEnrollmentIDChanged();
321 private int _EnrollmentID;
322 partial void OnEnrollmentIDChanging(int value);
323 partial void OnEnrollmentIDChanged();
324 /// <summary>
325 /// There are no comments for Property Grade in the schema.
326 /// </summary>
327 [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
328 [global::System.Runtime.Serialization.DataMemberAttribute()]
329 public global::System.Nullable<decimal> Grade
333 return this._Grade;
337 this.OnGradeChanging(value);
338 this.ReportPropertyChanging("Grade");
339 this._Grade = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
340 this.ReportPropertyChanged("Grade");
341 this.OnGradeChanged();
344 private global::System.Nullable<decimal> _Grade;
345 partial void OnGradeChanging(global::System.Nullable<decimal> value);
346 partial void OnGradeChanged();
347 /// <summary>
348 /// There are no comments for Course in the schema.
349 /// </summary>
350 [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("SchoolModel", "FK_CourseGrade_Course", "Course")]
351 [global::System.Xml.Serialization.XmlIgnoreAttribute()]
352 [global::System.Xml.Serialization.SoapIgnoreAttribute()]
353 [global::System.Runtime.Serialization.DataMemberAttribute()]
354 public Course Course
358 return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Course>("SchoolModel.FK_CourseGrade_Course", "Course").Value;
362 ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Course>("SchoolModel.FK_CourseGrade_Course", "Course").Value = value;
365 /// <summary>
366 /// There are no comments for Course in the schema.
367 /// </summary>
368 [global::System.ComponentModel.BrowsableAttribute(false)]
369 [global::System.Runtime.Serialization.DataMemberAttribute()]
370 public global::System.Data.Objects.DataClasses.EntityReference<Course> CourseReference
374 return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Course>("SchoolModel.FK_CourseGrade_Course", "Course");
378 if ((value != null))
380 ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Course>("SchoolModel.FK_CourseGrade_Course", "Course", value);
384 /// <summary>
385 /// There are no comments for Person in the schema.
386 /// </summary>
387 [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("SchoolModel", "FK_CourseGrade_Student", "Person")]
388 [global::System.Xml.Serialization.XmlIgnoreAttribute()]
389 [global::System.Xml.Serialization.SoapIgnoreAttribute()]
390 [global::System.Runtime.Serialization.DataMemberAttribute()]
391 public Person Person
395 return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Person>("SchoolModel.FK_CourseGrade_Student", "Person").Value;
399 ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Person>("SchoolModel.FK_CourseGrade_Student", "Person").Value = value;
402 /// <summary>
403 /// There are no comments for Person in the schema.
404 /// </summary>
405 [global::System.ComponentModel.BrowsableAttribute(false)]
406 [global::System.Runtime.Serialization.DataMemberAttribute()]
407 public global::System.Data.Objects.DataClasses.EntityReference<Person> PersonReference
411 return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Person>("SchoolModel.FK_CourseGrade_Student", "Person");
415 if ((value != null))
417 ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Person>("SchoolModel.FK_CourseGrade_Student", "Person", value);
422 /// <summary>
423 /// There are no comments for SchoolModel.Person in the schema.
424 /// </summary>
425 /// <KeyProperties>
426 /// PersonID
427 /// </KeyProperties>
428 [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="SchoolModel", Name="Person")]
429 [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
430 [global::System.Serializable()]
431 [global::System.Runtime.Serialization.KnownTypeAttribute(typeof(global::CSLinqToEntities.Student))]
432 [global::System.Runtime.Serialization.KnownTypeAttribute(typeof(global::CSLinqToEntities.Instructor))]
433 public partial class Person : global::System.Data.Objects.DataClasses.EntityObject
435 /// <summary>
436 /// Create a new Person object.
437 /// </summary>
438 /// <param name="personID">Initial value of PersonID.</param>
439 /// <param name="lastName">Initial value of LastName.</param>
440 /// <param name="firstName">Initial value of FirstName.</param>
441 public static Person CreatePerson(int personID, string lastName, string firstName)
443 Person person = new Person();
444 person.PersonID = personID;
445 person.LastName = lastName;
446 person.FirstName = firstName;
447 return person;
449 /// <summary>
450 /// There are no comments for Property PersonID in the schema.
451 /// </summary>
452 [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
453 [global::System.Runtime.Serialization.DataMemberAttribute()]
454 public int PersonID
458 return this._PersonID;
462 this.OnPersonIDChanging(value);
463 this.ReportPropertyChanging("PersonID");
464 this._PersonID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
465 this.ReportPropertyChanged("PersonID");
466 this.OnPersonIDChanged();
469 private int _PersonID;
470 partial void OnPersonIDChanging(int value);
471 partial void OnPersonIDChanged();
472 /// <summary>
473 /// There are no comments for Property LastName in the schema.
474 /// </summary>
475 [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
476 [global::System.Runtime.Serialization.DataMemberAttribute()]
477 public string LastName
481 return this._LastName;
485 this.OnLastNameChanging(value);
486 this.ReportPropertyChanging("LastName");
487 this._LastName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
488 this.ReportPropertyChanged("LastName");
489 this.OnLastNameChanged();
492 private string _LastName;
493 partial void OnLastNameChanging(string value);
494 partial void OnLastNameChanged();
495 /// <summary>
496 /// There are no comments for Property FirstName in the schema.
497 /// </summary>
498 [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
499 [global::System.Runtime.Serialization.DataMemberAttribute()]
500 public string FirstName
504 return this._FirstName;
508 this.OnFirstNameChanging(value);
509 this.ReportPropertyChanging("FirstName");
510 this._FirstName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
511 this.ReportPropertyChanged("FirstName");
512 this.OnFirstNameChanged();
515 private string _FirstName;
516 partial void OnFirstNameChanging(string value);
517 partial void OnFirstNameChanged();
518 /// <summary>
519 /// There are no comments for Property Picture in the schema.
520 /// </summary>
521 [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
522 [global::System.Runtime.Serialization.DataMemberAttribute()]
523 public byte[] Picture
527 return global::System.Data.Objects.DataClasses.StructuralObject.GetValidValue(this._Picture);
531 this.OnPictureChanging(value);
532 this.ReportPropertyChanging("Picture");
533 this._Picture = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
534 this.ReportPropertyChanged("Picture");
535 this.OnPictureChanged();
538 private byte[] _Picture;
539 partial void OnPictureChanging(byte[] value);
540 partial void OnPictureChanged();
541 /// <summary>
542 /// There are no comments for CourseGrade in the schema.
543 /// </summary>
544 [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("SchoolModel", "FK_CourseGrade_Student", "CourseGrade")]
545 [global::System.Xml.Serialization.XmlIgnoreAttribute()]
546 [global::System.Xml.Serialization.SoapIgnoreAttribute()]
547 [global::System.Runtime.Serialization.DataMemberAttribute()]
548 public global::System.Data.Objects.DataClasses.EntityCollection<CourseGrade> CourseGrade
552 return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection<CourseGrade>("SchoolModel.FK_CourseGrade_Student", "CourseGrade");
556 if ((value != null))
558 ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection<CourseGrade>("SchoolModel.FK_CourseGrade_Student", "CourseGrade", value);
562 /// <summary>
563 /// There are no comments for Course in the schema.
564 /// </summary>
565 [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("SchoolModel", "CourseInstructor", "Course")]
566 [global::System.Xml.Serialization.XmlIgnoreAttribute()]
567 [global::System.Xml.Serialization.SoapIgnoreAttribute()]
568 [global::System.Runtime.Serialization.DataMemberAttribute()]
569 public global::System.Data.Objects.DataClasses.EntityCollection<Course> Course
573 return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection<Course>("SchoolModel.CourseInstructor", "Course");
577 if ((value != null))
579 ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection<Course>("SchoolModel.CourseInstructor", "Course", value);
584 /// <summary>
585 /// There are no comments for SchoolModel.Student in the schema.
586 /// </summary>
587 /// <KeyProperties>
588 /// PersonID
589 /// </KeyProperties>
590 [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="SchoolModel", Name="Student")]
591 [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
592 [global::System.Serializable()]
593 public partial class Student : Person
595 /// <summary>
596 /// Create a new Student object.
597 /// </summary>
598 /// <param name="personID">Initial value of PersonID.</param>
599 /// <param name="lastName">Initial value of LastName.</param>
600 /// <param name="firstName">Initial value of FirstName.</param>
601 public static Student CreateStudent(int personID, string lastName, string firstName)
603 Student student = new Student();
604 student.PersonID = personID;
605 student.LastName = lastName;
606 student.FirstName = firstName;
607 return student;
609 /// <summary>
610 /// There are no comments for Property EnrollmentDate in the schema.
611 /// </summary>
612 [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
613 [global::System.Runtime.Serialization.DataMemberAttribute()]
614 public global::System.Nullable<global::System.DateTime> EnrollmentDate
618 return this._EnrollmentDate;
622 this.OnEnrollmentDateChanging(value);
623 this.ReportPropertyChanging("EnrollmentDate");
624 this._EnrollmentDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
625 this.ReportPropertyChanged("EnrollmentDate");
626 this.OnEnrollmentDateChanged();
629 private global::System.Nullable<global::System.DateTime> _EnrollmentDate;
630 partial void OnEnrollmentDateChanging(global::System.Nullable<global::System.DateTime> value);
631 partial void OnEnrollmentDateChanged();
633 /// <summary>
634 /// There are no comments for SchoolModel.Instructor in the schema.
635 /// </summary>
636 /// <KeyProperties>
637 /// PersonID
638 /// </KeyProperties>
639 [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="SchoolModel", Name="Instructor")]
640 [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
641 [global::System.Serializable()]
642 public partial class Instructor : Person
644 /// <summary>
645 /// Create a new Instructor object.
646 /// </summary>
647 /// <param name="personID">Initial value of PersonID.</param>
648 /// <param name="lastName">Initial value of LastName.</param>
649 /// <param name="firstName">Initial value of FirstName.</param>
650 public static Instructor CreateInstructor(int personID, string lastName, string firstName)
652 Instructor instructor = new Instructor();
653 instructor.PersonID = personID;
654 instructor.LastName = lastName;
655 instructor.FirstName = firstName;
656 return instructor;
658 /// <summary>
659 /// There are no comments for Property HireDate in the schema.
660 /// </summary>
661 [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
662 [global::System.Runtime.Serialization.DataMemberAttribute()]
663 public global::System.Nullable<global::System.DateTime> HireDate
667 return this._HireDate;
671 this.OnHireDateChanging(value);
672 this.ReportPropertyChanging("HireDate");
673 this._HireDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
674 this.ReportPropertyChanged("HireDate");
675 this.OnHireDateChanged();
678 private global::System.Nullable<global::System.DateTime> _HireDate;
679 partial void OnHireDateChanging(global::System.Nullable<global::System.DateTime> value);
680 partial void OnHireDateChanged();